<template>
  <div>

    <div id="map"></div>


    <div class="tool">
      <button @click="addIW">添加</button>
      <br>
      <button @click="addNum">+1</button>
    </div>
  </div>
</template>

<script>


import {createMap,} from "@/gaode";
import createInfoWindow from "@/components/createInfoWindow";

export default {
  name: 'App',
  data() {
    return {
      gInfoWindow: null,
    }
  },
  mounted() {
    createMap('map', {
      viewMode: '3D',
    })
  },
  methods: {
    addIW() {
      this.gInfoWindow = createInfoWindow(2)
    },
    addNum() {
      this.gInfoWindow.app.add();
    }
  }
}
</script>

<style>
* {
  padding: 0;
  margin: 0;

}

#map {
  height: 100vh;
  width: 100vw;
}

.tool {
  position: absolute;
  left: 10px;
  top: 10px;
  background-color: aquamarine;
  padding: 5px;
}
</style>
